@import "./variable";

#app {
    // 侧边栏
    .sidebar-container {
        transition: width #{$sidebar-duration};
        height: 100%;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1001;
        overflow: hidden;
        background-color: $basic-color;

        // 侧边栏菜单
        .sidebar-menu {
            border: none;
            height: 100%;
            width: 100% !important;
            font-weight: bold;

            // 侧边栏菜单项
            .menu-item {
                &:hover {
                    background-color: $basic-color;
                    color: $hover-color;
                }
            }
        }

        // 侧边栏伸缩
        .horizontal-collapse-transition {
            transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
        }
    }

    // 内容区域 (包括头部和主体)
    .content-container {
        width: calc(100% - #{$sidebar-width});
        height: 100%;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 9;
        transition: all 0.28s;

        &.hidden {
            width: calc(100% - #{$sidebar-collapse-width});
        }

        // 头部导航栏
        .header-container {
            width: 100%;
            height: 60px;
            overflow: hidden;
            background-color: $white-color;
            box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
            padding: 0 16px;
            display: flex;
            align-items: center;
            box-sizing: border-box;
            position: relative;

            // 汉堡伸缩按钮图标
            .header-icon {
                color: $basic-color;
                cursor: pointer;

                &:hover {
                    color: $hover-color;
                }
            }

            // 汉堡伸缩按钮
            .hamburger-container {
                margin-right: 16px;
                box-sizing: border-box;
                cursor: pointer;
            }

            // 面包屑跳转
            .breadcrumb-container {
                margin-left: 20px;
                margin-top: 22px;
                // 横向排列
                display: flex;

                // 可点击跳转的面包屑
                .breadcrumb-redirect {
                    color: $text-color;
                    font-weight: bold;
                    cursor: pointer;

                    &:hover {
                        color: $basic-color;
                    }
                }

                // 不可点击的面包屑
                .breadcrumb-no-redirect {
                    color: $hover-color;
                    font-weight: bold;
                    cursor: default;
                }
            }

            // 头部导航栏右侧区域
            .header-right-container {
                flex: 1;
                display: flex;
                align-items: center;
                justify-content: flex-end;

                :deep(.navbar-item) {
                    display: inline-block;
                    margin-left: 18px;
                    font-size: 22px;
                    color: $medium-gray-color;
                    box-sizing: border-box;
                    cursor: pointer;
                }

                // 头像下拉框
                .avatar-dropdown {
                    margin-right: 20px;
                    cursor: pointer;

                    // el-avatar 背景颜色改为 none
                    .el-avatar {
                        --el-avatar-background-color: none !important;
                        --el-avatar-bg-color: none !important;
                    }

                    // 头像文本
                    .avatar-text {
                        font-size: $header-emoji-size;
                    }
                }

                // 主题下拉框
                .theme-dropdown {
                    margin-right: 10px;
                    cursor: pointer;

                    // el-avatar 背景颜色改为 none
                    .el-avatar {
                        --el-avatar-background-color: none !important;
                        --el-avatar-bg-color: none !important;
                    }

                    // 主题文本
                    .theme-text {
                        font-size: $header-emoji-size;
                    }
                }

                // 指南引导按钮
                .guide-driver-container {
                    margin-right: 12px;
                }

                // 全屏按钮
                .screen-full-container {
                    margin-right: 18px;
                }
            }
        }

        // 首页主体区
        .home-container {
            width: 100%;
            min-height: 100%;
            background: linear-gradient(105deg, $basic-color 50%, $hover-color 50%);
            display: flex;

            // 标题区域
            .title-container {
                font-size: 8vw;
                font-weight: bold;
                margin: auto;

                // 文本左部
                .title-left {
                    color: $hover-color;
                }

                // 文本中部
                .title-middle {
                    background: linear-gradient(105deg, $hover-color 58%, $basic-color 42%);
                    -webkit-background-clip: text;
                    -webkit-text-fill-color: transparent;
                }

                // 文本右部
                .title-right {
                    color: $basic-color;
                }
            }
        }

        // 主体区
        .main-container {

            // 搜索框 × 删除按钮居中
            :deep(.el-input__suffix) {
                align-items: center;
            }

            // 表格头部
            .table-header {
                padding-bottom: 16px;
                box-sizing: border-box;
            }

            // 表格分页器
            .table-pagination {
                margin-top: 20px;
            }

            // 操作按钮
            .option-button {
                // 按钮文本样式
                color: $white-color;
                font-weight: bold;
            }
        }
    }

    // 错误页
    .error-container {
        width: 100%;
        min-height: 100%;
        background: linear-gradient(105deg, $basic-color 50%, $hover-color 50%);
        display: flex;

        // 标题
        .title {
            font-size: 24vw;
            font-weight: bold;
            margin: auto;
            background: linear-gradient(105deg, $hover-color 50%, $basic-color 50%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    }
}
